package com.lxy.service.impl;

import com.lxy.bean.Role;
import com.lxy.dao.RoleMapper;
import com.lxy.generic.GenericDao;
import com.lxy.generic.GenericServiceImpl;
import com.lxy.service.RoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("roleService")
public class RoleServiceImpl  extends GenericServiceImpl<Role, Integer> implements RoleService {
	@Resource
	private RoleMapper roleMapper;
	
	@Override
	public GenericDao<Role, Integer> getDao() {
		// TODO Auto-generated method stub
		return roleMapper;
	}

	@Override
	public List<Role> getRolesByUserId(Integer userId) {
		// TODO Auto-generated method stub
		return roleMapper.getRolesByUserId(userId);
	}
	

}
